<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>重置期初建账</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		
		function change(){
			
			var url = "${ctx}/vaccinate/bsProduct/findbatchByVacc";
			$.ajax({
				url:url,
				data:{"vaccId":$("#vaccineid").val()},
				success:function(data){
					
					var html = "";
					var htmll =""
					$.each(data,function(i,t){
						html += "<option>" + t.batchno + "</option>"
						
					});
					
					
					 var companyNameT = "_";
					$.each(data,function(i,t){
						if(companyNameT.indexOf(t.companyName) < 0){
							htmll += "<option>" + t.companyName + "</option>"
							companyNameT += t.companyName + "_";
						}
						
					}); 
					$("#batchno").html("<option value=''>--请选择--</option>");
					$("#companyName").html("<option value=''>--请选择--</option>");
					$("#companyName").html(htmll);
					$("#batchno").html(html);
					
				}
				
			});
		}
		
		function down(){
			top.$.jBox.confirm("确认要导出出入库数据吗？","系统提示",function(v,h,f){
				if(v=="ok"){
					$("#searchForm").attr("action","${ctx}/vaccinate/bsProduct/export");
					$("#searchForm").submit();
				}
			},{buttonsFocus:1});
			top.$('.jbox-body .jbox-icon').css('top','55px');
		}
		
		
		
	</script>

	<style type="text/css">
		.minWidth {
			min-width: 177px;
		}	
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/vaccinate/bsProduct/">订单管理</a></li>
	
	</ul>
	<form:form id="searchForm" modelAttribute="bsProduct" action="${ctx}/vaccinate/bsProduct/queryRecordList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div class="breadcrumb">
			<table class="table table-bordered">
				
				<tr>
					<th>地区</th>
					<td>
						<input type="text" class="input-medium"/>
						<input type="button" class="btn btn-primary btn-small" onclick="select()" value="选择"/>	
					</td>
					<th>出入库开始日期</th>
					<td>
						<input name="starttime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${bsProduct.beginVaccExpDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
							
					</td>
					<th>出入库截止日期</th>
					<td >
						<input name="endtime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${bsProduct.endVaccExpDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
					</td>
				</tr>

				<tr>
					<th>出入库单号</th>
					<td>
						<input type="text" class="input-medium"/>
					</td>
					<td colspan="4"><input class="btn btn-primary" type="submit" value="提交订单"/>&nbsp;&nbsp;<label style="color:red">请填写出入库订单号查询 </label></td>
				</tr>
			</table>
			
			
		</div>
	
		
	</form:form>
	
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				
				<shiro:hasPermission name="vaccinate:bsProduct:edit"><th>操作</th></shiro:hasPermission>
				<th>出入库类型</th>
				<th>出入库单号</th>
				<th>出入库日期</th>
				<th>供货单位</th>
				<th>收货单位</th>
				<th>录入单位</th>
				<th>所属单位</th>
				
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="records" begin="1" step="1" varStatus="status">
			<tr>
				
				<shiro:hasPermission name="vaccinate:bsProduct:view"><td>
    				<a href="${ctx}/vaccinate/bsProduct/queryRecord?id=${records.id}">查看</a>
					
				</td></shiro:hasPermission>
				<td></td>
				<td>
			
				</td>
				<td>
					<fmt:formatDate value="${records.createDate}" pattern="yyyy-MM-dd HH:mm:ss"	/>
				</td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<br/>
	<p>出库/入库管理，使用须知： </p>
	<div  style="text-indent:20px;color:red;font-size:12px">
		<p>1、查询订单数据范围包括入库单[本单位入库]、出库单[下发/售出、退回上级、使用、报废、退回供货企业]</p>
		<p>2、均可以修改订单的日期、删除订单</p>
		<p>3、修改供货单位仅限于入库单[本单位入库]</p>
		<p>4、修改收货单位仅限于出库单[退回供货企业]</p>
		<p>5、当前只支持通过订单号单个查询</p>
		<p>6、如果本单位订单有误，请联系上级管理员修改或删除，需提供订单号</p>
		<p>7、暂不支持修改出库/入库数量</p>
	</div>
	<div class="pagination">${page}</div>
</body>
</html>